package com.yonyougov.devops.cruxcisupport.menu;

import com.yonyougov.devops.cruxcisupport.menu.vo.AllMenuLinkRespVo;
import com.yonyougov.devops.cruxcisupport.menu.vo.NoLinkMenuByRoleIdVo;
import com.yonyougov.devops.cruxcisupport.menu.vo.NoLinkMenuPageByRoleIdDto;
import com.yonyougov.devops.fwc.core.entity.Pagination;
import com.yonyougov.devops.fwc.core.service.BaseService;

import java.math.BigInteger;
import java.util.List;

/**
 * t_menu服务
 */
public interface MenuService extends BaseService<MenuEntity, BigInteger> {

    //<!--用户自定义代码开始-->

    Pagination<NoLinkMenuByRoleIdVo> findNoLinkMenuPageByRoleId(NoLinkMenuPageByRoleIdDto noLinkMenuPageByRoleIdDto);

    List<AllMenuLinkRespVo> findLinkMenuByUserId(BigInteger userId);

    /**
     * 查询所有顶级菜单(绕过权限)
     *
     * @return List<MenuEntity>
     */
    List<MenuEntity> findAllRootMenu();

    /**
     * 删除一个菜单
     *
     * @param menuId 菜单id
     */
    void deleteOneMenuByMenuId(BigInteger menuId);


    //<!--用户自定义代码结束-->
}
